package com.hzyl.famousreader.repository.webservice.api;

import android.arch.lifecycle.LiveData;
import com.hzyl.famousreader.repository.persistence.entity.Ad;
import com.hzyl.famousreader.repository.webservice.cache.ApiResponse;
import com.hzyl.famousreader.repository.webservice.model.PageWrapper;
import com.hzyl.famousreader.repository.webservice.model.Result;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

import java.util.List;

/**
 * 广告API
 */
public interface AdService {

  @GET("android/public/ad/banner")
  LiveData<ApiResponse<Result<List<Ad>>>> getAdBanner();

  @GET("android/public/ads")
  Call<Result<PageWrapper<Ad>>> getDiscoveryAds(@Query("pi") Integer pi, @Query("ps") Integer ps);

  @GET("android/public/ads")
  LiveData<ApiResponse<Result<PageWrapper<Ad>>>> getDiscoveryAdsV2(@Query("pi") Integer pi, @Query("ps") Integer ps);
}
